home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1199 / 1102 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  2.0 KB

  1. Date: Sat, 26 Feb 1994 23:36:16 -0500
  2. From: "Nicholas S Castellano" <entropy@terminator.rs.itd.umich.edu>
  3. To: mint@terminator.rs.itd.umich.edu
  4. Subject: Real TIOCSETP
  5.  
  6. tty.c, file.h, xbios.c: ++entropy@terminator.rs.itd.umich.edu
  7.     Add a real TIOCSETP (differs from TIOCSETN in that it waits for
  8.     the output buffer to be empty if the device supports TIOCOUTQ.)
  9.     Remove a kludge in rsconf() which is not needed if a real TIOCSETP
  10.     exists.
  11.  
  12. --- 1.10.1.2    1994/02/27 04:02:16
  13. +++ tty.c    1994/02/27 04:10:14
  14. @@ -454,6 +454,7 @@
  15.      int i;
  16.      long baud;
  17.      short flags;
  18. +    long outq;
  19.  
  20.      if (!is_terminal(f)) {
  21.          DEBUG(("tty_ioctl(mode %x): file is not a tty", mode));
  22. @@ -481,6 +482,10 @@
  23.          *sg = tty->sg;
  24.          return 0;
  25.      case TIOCSETP:
  26. +        while (((*f->dev->ioctl)(f, TIOCOUTQ, &outq) == 0) && outq)
  27. +            nap(200);
  28. +        /* FALL THROUGH */
  29. +    case TIOCSETN:
  30.          sg = (struct sgttyb *)arg;
  31.          tty->sg = *sg;
  32.          /* set the tty state for checking control characters */
  33. --- 1.10    1994/02/17 08:01:22
  34. +++ xbios.c    1994/02/26 13:54:26
  35. @@ -187,6 +187,7 @@
  36.          else if (baud > -1)
  37.              oldbaud = baud;
  38.      }
  39. +#if 0 /* now handled in tty.c (real TIOCSETP) */
  40.  /* This part _is_ necessary on TOS 1.04 */
  41.      if (tosvers <= 0x0104) {
  42.          int attempts = 0;
  43. @@ -206,6 +207,7 @@
  44.              nap(200);
  45.          }
  46.      }
  47. +#endif
  48.  #endif /* ONLY030 */
  49.  
  50.      rsval = Rsconf(baud, flow, uc, rs, ts, sc);
  51. --- 1.10.1.2    1994/02/24 16:15:06
  52. +++ file.h    1994/02/26 13:44:04
  53. @@ -340,7 +340,6 @@
  54.  #define FIONWRITE    (('F'<< 8) | 2)
  55.  #define TIOCGETP    (('T'<< 8) | 0)
  56.  #define TIOCSETP    (('T'<< 8) | 1)
  57. -#define TIOCSETN    TIOCSETP
  58.  #define TIOCGETC    (('T'<< 8) | 2)
  59.  #define TIOCSETC    (('T'<< 8) | 3)
  60.  #define TIOCGLTC    (('T'<< 8) | 4)
  61. @@ -361,6 +360,7 @@
  62.  #define TIOCGFLAGS    (('T'<< 8) | 22)
  63.  #define TIOCSFLAGS    (('T'<< 8) | 23)
  64.  #define TIOCOUTQ    (('T'<< 8) | 24)
  65. +#define TIOCSETN    (('T'<< 8) | 25)
  66.  
  67.  /* cursor control Fcntls:
  68.   * NOTE THAT THESE MUST BE TOGETHER
  69.  
  70. --
  71. entropy -- it's not just a good idea, it's the second law.
  72. Personal mail:      entropy@gnu.ai.mit.edu
  73. MiNT library mail:  entropy@terminator.rs.itd.umich.edu
  74. "what do you have against octal?" -jrb
  75.  
  76.